import { uploadImageAPI } from '@/api/common'

const actions = {
  /*
  * 上传图片的action
  *  */
  async uploadImageAction(context, file) {
    const { data } = await uploadImageAPI(file)
    return { name: file.get('file').name, url: data,uid:file.get('file').uid }
  }
}
const mutations = {}
const state = () => {
  return {}
}

export default {
  actions,
  mutations,
  state,
  namespaced: true
}
